﻿using System.Collections.Generic;
using Util;

namespace Core.StateMachine
{
    /*
     * 模拟经营（外围组）  + 三消（三消组） 
     * GameObject  (x)
     *
     * 策划提个需求 -> 评审 -> pm给你排期  ->  功能开发/美术资源制作  ->  资源合入 ->  验收  -> 测试
     *
     * DOTween（插件）程序动画插件
     * 
     */ 
    
    
    /// <summary>
    /// 状态组
    /// </summary>
    public class BaseStateGroup : BaseState
    {
        private LinkedList<BaseState> states;
        
        private BaseState curState;

        public BaseStateGroup(string name) : base(name)
        {
            states = new LinkedList<BaseState>();
        }

        protected override void enter()
        {
            
        }

        protected override void exit()
        {
            
        }

        public void Add(BaseState state)
        {
            if (states.Count == 0)
            {
                states.AddLast(state);
                return;
            }
            states.Last.Value.NextState = state;
            states.AddLast(state);
        }
    }
}